<!DOCTYPE html>
<html>
<head>
    <base href="${springMacroRequestContext.contextPath}/"/>
    <meta charset="utf-8">
    <title>管理文案哲理</title>
    <script src="static/js/vue.js"></script>
    <link rel="stylesheet" href="static/css/index.css">
    <script src="static/js/elementui-index.js"></script>
    <script src="static/js/axios.js"></script>
    <style>
        .el-row {
            margin-bottom: 20px;
            &:last-child {
                margin-bottom: 0;
            }
        }
        .el-col {
            border-radius: 4px;
        }
        .bg-purple-dark {
            background: #99a9bf;
        }
        .bg-purple {
            background: #d3dce6;
        }
        .bg-purple-light {
            background: #e5e9f2;
        }
        .grid-content {
            border-radius: 4px;
            min-height: 36px;
        }
        .row-bg {
            padding: 10px 0;
            background-color: #f9fafc;
        }

        #toolDiv{
            padding-top: 20px;
            padding-left: 10%;
            padding-right: 10%;
        }
    </style>
</head>
<body style="width: 100%;height: 100%;margin: 0px;background-color:#fff">
<div id="app" >
    <div id="toolDiv">
        <el-row :gutter="20">
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
        </el-row>
        <el-row :gutter="20">
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
            <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
        </el-row>
    </div>
</div>
</body>
<script>
    var token = localStorage.getItem("token");

    new Vue({
        el:'#app',
        data:{
            textData:[],
            pageSize:20,
            pageNo:1,
            totalSize:0,
            typeList:[],
            loading: false
        },
        methods:{
            searchResource(){
                axios.get('resources/getResourcesList?title=&resourceId=&level=&type=文案哲理&pageNo='+this.pageNo+'&pageSize='+this.pageSize,{headers: {"Content-Type": "application/json","Authorization": token}}).then(resp=>{
                    if(resp.data.code!=200){
                        this.$message({
                            showClose: true,
                            message: resp.data.msg,
                            type: 'error'
                        });
                    }else{
                        this.totalSize = resp.data.total;
                        this.textData.push(...resp.data.data);
                        this.loading = false;
                    }
                }).catch(err=>{
                    console.log(err);
                })
            }
        },
        created() {
            this.searchResource();
        }
    })



</script>

</html>